﻿@model  ICollection<Inovout.Cloud.Models.Product>
<div class="w-1">
    <div class="wgt">
        <div class="w-1-6">
            @Html.Partial("_Navigation", (object)ViewBag.Project)
        </div>
        <div class="detail-list w-5-6" style="height: 680px;">
            <table id="apiTable" class="w-1">
                <colgroup>
                    <col class="w-1" />
                    <col class="w23" />
                </colgroup>
                <thead>
                    <tr>
                        <th>
                            <span class="detail_name">名称</span>
                            <span class="detail_status">状态</span>
                        </th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @{
                        foreach (var product in @ViewBag.Products)
                        {
                        <tr>
                            <td class="w-1">
                                <form action='@Url.ActionByProject("ChangeProduct", "Project")' method="post">
                                    <span class="detail_productname">@product.Name</span>
                                    @if (Model.Contains(product))
                                    {
                                        <div class="detail_submit">
                                            <input type="submit" value="关" class="open_submit" />
                                        </div>
                                        <input type="hidden" value="false" name="enable" />
                                    }
                                    else
                                    {
                                        <div class="detail_submit">
                                            <input type="submit" value="开" class="close_submit" />
                                        </div>
                                        <input type="hidden" value="true" name="enable" />
                                    }
                                    <input type="hidden" value='@product.Id' name="productId" />
                                </form>
                            </td>
                            <td></td>
                        </tr>
                        }
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
